module.exports = {
  devServer: {
    // host: 'localhost',
    port: 8080,
    https: false,
    open: true,
    proxy: {
      '/api': {
        target: "http://127.0.0.1:8000",
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/'
        }
      },
      '/static': {
        target: "http://127.0.0.1:8000/static/",
        ws: false,
        changeOrigin: true,
        pathRewrite: {
          '^/static': ''
        }
      }
    }
  },
  chainWebpack: config => {
    config.module
      .rule('images')
      .use('url-loader')
      .loader('url-loader')
      .tap(options => Object.assign(options, { limit: 20000 }))
  }
}